//
// Created by xqyr on 2025/4/13.
//

#ifndef DEVMIDWARE_LED_H
#define DEVMIDWARE_LED_H

#include "chardevapp.h"
class Led : protected CharDeviceAPP{
    public:
        enum{
            LED_ON = 0,
            LED_OFF =1
        };
        explicit Led(std::function<void(const bool)> fun = nullptr);
        void setLed(bool flag);
        bool getLed() ;
    public:
        void devChangeCallback(bool);

        void set_ledStatusChangeCallback(std::function<void(const bool)> fun);
        std::function<void(const bool)> ledStatusChangeCallback = nullptr;
    private:
        bool ledStatus = LED_OFF;
};


#endif //DEVMIDWARE_LED_H
